﻿
//时间选择往后1天
function minusOneDay(date) {
    var data = thisdata();//搜索条件
    if (data.enddate != undefined && data.enddate != '') {
        var nextDay = new Date(date);
        nextDay.setDate(nextDay.getDate() - 1);
        nextDay = nextDay.toISOString().split('T')[0]; // 转换为年月日格式
        return nextDay;
    }

    return date;
}

//时间选择往后1天
function addOneDay(date) {
    var data = thisdata();//搜索条件
    if (data.startdate != undefined && data.startdate != '') {
        var nextDay = new Date(date);
        nextDay.setDate(nextDay.getDate() + 1);
        nextDay = nextDay.toISOString().split('T')[0]; // 转换为年月日格式
        return nextDay;
    }
    return date;
}